package com.example.testrecorder.domain;

import jxl.format.Colour;
import jxl.format.RGB;

/**
 * @author Yingyong Lao
 * 创建时间 2021/6/13 20:57
 * @version 1.0
 */
public class ExcelColor extends Colour {

    private int value;

    /**
     * The default RGB value
     */
    private RGB rgb;

    /**
     * The display string for the colour.  Used when presenting the
     * format information
     */
    private String string;

    private static Colour[] colours  = new Colour[0];

    /**
     * Private constructor
     *
     * @param val
     * @param s   the display string
     * @param r   the default red value
     * @param g   the default green value
     * @param b   the default blue value
     */
    protected ExcelColor(int val, String s, int r, int g, int b) {
        super(val, s, r, g, b);
        value = val;
        string = s;
        rgb = new RGB(r,g,b);

        Colour[] oldcols = colours;
        colours = new Colour[oldcols.length + 1];
        System.arraycopy(oldcols, 0, colours, 0, oldcols.length);
    }
    public final static Colour DARK_BLUE = new ExcelColor(0x41, "darkBlue", 0x51, 0x85, 0xca);
}
